package com.yunxin.core.infra.persistence.converter;

import com.yunxin.core.domain.model.popup.Popup;
import com.yunxin.core.domain.model.popup.PopupProductConfig;
import com.yunxin.core.infra.persistence.entity.popup.PopupDO;
import com.yunxin.core.infra.persistence.entity.popup.PopupProductConfigDO;
import org.mapstruct.Mapper;

/**
 * @author zero°
 * @since 2023-12-11
 */
@Mapper(componentModel = "spring")
public interface PopupConverter {


    /**
     * do 转 entity
     *
     * @param popupDO popupDO
     * @return Popup
     */
    Popup toPopup(PopupDO popupDO);


    /**
     * entity 转 do
     *
     * @param entity entity
     * @return PopupDO
     */
    PopupDO formPopup(Popup entity);

    /**
     * entity 转 do
     *
     * @param entity entity
     * @return PopupProductConfigDO
     */
    PopupProductConfigDO formPopupProductConfig(PopupProductConfig entity);

}
